package org.example.testcode.jvm;

import java.util.ArrayList;

/**
 * Debug JVM Paras
 * <p>
 * vm options:-Xms500M -Xmx500M -Xmn20M -XX:-UseAdaptiveSizePolicy
 * -XX:-UseAdaptiveSizePolicy  配置交换区固定值
 */
public class HeapTest {

    byte[] a = new byte[1024 * 10];  //10KB
    byte[] oneM = new byte[1024 * 1024];  //1M

    public static void main(String[] args) throws InterruptedException {

        //Object obj1 = new Object();
        //int32位

        ArrayList<HeapTest> heapTests = new ArrayList<>();
        while (true) {
            heapTests.add(new HeapTest());
            Thread.sleep(100);
        }


    }
}
